﻿@model StudyTracker.Web.Models.Data.AddSingleModel

<script type="text/javascript">

	$(document).ready(function () {
		$("#Subject").autocomplete({
			source: @Html.Raw(Json.Encode(Model.Subjects))
		});
	});

</script>

<hr class="space" />
<div class="span-12 prepend-6">
	@using (Html.BeginForm(MVC.Data.AddSingle(), FormMethod.Post, new {autocomplete = "off"}))
	{
		<div>
			I just completed @Html.TextBoxFor(c => c.Amount, new { placeholder = "3", @class = "number" }) units of @Html.TextBoxFor(c => c.Subject, new { placeholder = "physics", @class = "long-string" }) <input type="submit" value="OK" />
		</div>
		@Html.Hidden("returnUrl", Request.Url.PathAndQuery)
		@Html.ValidationSummary()
	}
</div>
